<?php use_helper('Number') ?>
<?php if( false ): //executed when payment per paypalor mokejimai.lt used?>
    <?php if(!empty($form)):?>
    <form action="<?php echo $form['action']; ?>" method="post">
        <fieldset>
            <legend><?php echo __('data to mokejiai.lt') ?></legend>
    
            <?php foreach ($form['data'] as $key => $val): ?>
            <label>
                <input type="hidden" name="<?php echo $key ?>" value="<?php echo htmlspecialchars($val); ?>" />
            </label>
            <?php endforeach; ?>
            <div class="input-preview"><?php echo format_currency($form['data']['amount']/100, $form['data']['currency']);?></div>
            <div class="input-preview"><?php echo $form['data']['paytext'];?></div>
            
        </fieldset>
        <input type="submit" value="Submit" />
    </form>
    <?php echo link_to(__('Cancel')
    				, 'cart/response'
    				, array('class' => ''))?>
    <?php else: ?>
        <?php echo __('no data');?>
    <?php endif; ?>
    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> 
        <!-- Identify your business so that you can collect the payments. --> 
        <input type="hidden" name="business" value="progla_1270107045_biz@gmail.com"> 
        <!-- Specify a Buy Now button. --> 
        <input type="hidden" name="cmd" value="_xclick"> 
        <!-- Specify details about the item that buyers will purchase. --> 
        <input type="hidden" name="item_name" value="Vintageboutique products"> 
        <input type="hidden" name="amount" value="<?php echo $amount/100;?>"> 
        <input type="hidden" name="currency_code" value="EUR"> 
        <input type="hidden" name="shipping" value="<?php echo $shipping/100;?>"> 
        <input type="hidden" name="item_number" value="<?php echo $form['data']['orderid']?>"> 
        <input type="hidden" name="return" value="http://eshop.interateitis.lt/test.php/lt/cart/response?answer=paypal">
        <input type="hidden" name="cancel_return" value="http://eshop.interateitis.lt/test.php/lt/cart/response?answer=cancel"> 
        <input type="hidden" name="rm" value="2">
        <!-- Display the payment button. --> 
        <input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online"> 
            <img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" > 
    </form>
<?php else: ?>
    <?php echo __('Thank you for your order, we will contact you.')?>
    
<?php endif; ?>